package api

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"zk/api/handler"
)

func LoadReder(r *gin.Engine) {

	api := r.Group("/api")
	{
		user := r.Group("/user")
		{
			user.POST("/register", handler.Register)
			user.POST("/login", handler.Login)
		}
		live_room := r.Group("/live_room")
		{
			live_room.POST("/liveRoomAdd", handler.LiveRoomAdd)
			live_room.POST("/liveRoomList", handler.LiveRoomList)
			live_room.POST("/liveRoomUpdate", handler.LiveRoomUpdate)
			live_room.POST("/liveRoomDelete", handler.LiveRoomDelete)
		}
		gift := r.Group("/gift")
		{
			gift.POST("/giftAdd", handler.GiftAdd)
			gift.POST("/giftList", handler.GiftList)
			gift.POST("/giftUpdate", handler.GiftUpdate)
			gift.POST("/giftDelete", handler.GiftDelete)
		}
		user_interaction := r.Group("/user_interaction")
		{
			user_interaction.POST("/userInteractionAdd", handler.UserInteractionAdd)
			user_interaction.POST("/userInteractionList", handler.UserInteractionList)
			user_interaction.POST("/userInteractionUpdate", handler.UserInteractionUpdate)
			user_interaction.POST("/userInteractionDelete", handler.UserInteractionDelete)
		}
	}

	fmt.Println(api)

}
